FROM google/dart

WORKDIR /shelf

ENV PUB_HOSTED_URL=https://pub.flutter-io.cn
ENV FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn

ADD pubspec.* /shelf/
RUN pub get
ADD . /shelf
RUN pub get --offline

CMD []
ENTRYPOINT ["/usr/bin/dart", "./bin/server.dart"]
